package com.ruoyi.business.service;

import java.util.List;
import com.ruoyi.business.domain.ShoppingCar;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.business.domain.vo.ShoppingCarVo;

/**
 * 购物车Service接口
 * 
 * @author 吴倩芸
 * @date 2023-03-07
 */
public interface IShoppingCarService extends IService<ShoppingCar>
{
    /**
     * 查询购物车
     * 
     * @param id 购物车主键
     * @return 购物车
     */
    public ShoppingCar selectShoppingCarById(Long id);

    /**
     * 查询购物车列表
     * 
     * @param shoppingCar 购物车
     * @return 购物车集合
     */
    public List<ShoppingCarVo> selectShoppingCarList(ShoppingCar shoppingCar);

    /**
     * 新增购物车
     * 
     * @param shoppingCar 购物车
     * @return 结果
     */
    public int insertShoppingCar(ShoppingCar shoppingCar);

    /**
     * 修改购物车
     * 
     * @param shoppingCar 购物车
     * @return 结果
     */
    public int updateShoppingCar(ShoppingCar shoppingCar);

    /**
     * 批量删除购物车
     * 
     * @param ids 需要删除的购物车主键集合
     * @return 结果
     */
    public int deleteShoppingCarByIds(Long[] ids);

    /**
     * 删除购物车信息
     * 
     * @param id 购物车主键
     * @return 结果
     */
    public int deleteShoppingCarById(Long id);

    /**
     * 清空购物车
     * @param list
     * @return
     */
    public int clearShoppingCar(List<ShoppingCar> list);
}
